package cn.meye11.crm.domain.model;

import cn.meye11.crm.domain.entity.ConsumptionTimesEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 计次消费表(ConsumptionTimes)模型类
 *
 * @author makejava
 * @since 2023-12-09 20:21:05
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//@ApiModel("计次消费表")
public class ConsumptionTimes implements Serializable {

    private static final long serialVersionUID = 727560654476196147L;
    
    public ConsumptionTimes(ConsumptionTimesEntity entity) {
        BeanUtils.copyProperties(entity, this);
    }
    
    private Long id;
    //@ApiModelProperty(value = "会员ID")
    @NotNull(message = "会员ID 不能为空")
    private Long memberId;
    //@ApiModelProperty(value = "会员名称")
    private String memberName;
    //@ApiModelProperty(value = "充次记录ID")
    @NotNull(message = "充次记录ID 不能为空")
    private Long rechargeId;
    //@ApiModelProperty(value = "充值活动名称")
    @NotEmpty(message = "充值活动名称 不能为空")
    private String activityName;
    //@ApiModelProperty(value = "消费次数")
    @NotNull(message = "消费次数 不能为空")
    private Integer times;
    //@ApiModelProperty(value = "消费项目，逗号分隔")
    @NotEmpty(message = "消费项目，逗号分隔 不能为空")
    private String items;
    //@ApiModelProperty(value = "消费时间")
    @NotNull(message = "消费时间 不能为空")
    private LocalDateTime consumptionTime;
    //@ApiModelProperty(value = "进店渠道")
    private String fitEntryChannels;
    //@ApiModelProperty(value = "操作人ID")
    private Long userId;
    //@ApiModelProperty(value = "操作人姓名")
    private String operators;
    //@ApiModelProperty(value = "客户画像标签")
    private String label;
    //@ApiModelProperty(value = "是否删除", hidden = true)
    private Integer del;
    //@ApiModelProperty(value = "最后修改时间", notes = "yyyy-MM-dd HH:mm:ss", example = "2020-01-01 00:00:00", hidden = true)
    private LocalDateTime last;
    //@ApiModelProperty(value = "创建时间", notes = "yyyy-MM-dd HH:mm:ss", example = "2020-01-01 00:00:00", hidden = true)
    private LocalDateTime time;
    //@ApiModelProperty(value = "创建人", hidden = true)
    private String createdBy;
    //@ApiModelProperty(value = "最后修改人", hidden = true)
    private String modifiedBy;
    //@ApiModelProperty(value = "版本")
    private Integer version;

}
